package com.mark.mall.web.platform.dto.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @author admin
 * Created on 2021/3/3 15:05
 */
@Data
@ApiModel("前台会员注册")
public class MemberRegisterParam {
    @ApiModelProperty(value = "会员名称")
    @NotEmpty(message = "会员名称不能为空！")
    private String name;

    @ApiModelProperty(value = "会员密码")
    @NotEmpty(message = "会员密码不能为空！")
    private String password;

    @ApiModelProperty(value = "会员真实姓名")
    private String realname;

    @ApiModelProperty(value = "性别")
    private String sex;

    @ApiModelProperty(value = "会员手机号")
    @NotEmpty(message = "会员手机号不能为空！")
    @Pattern(regexp = "^((13[0-9])|(14[5,6,7,9])|(15[^4])|(16[5,6])|(17[0-9])|(18[0-9])|(19[1,8,9]))\\d{8}$", message = "手机号非法，请核实！")
    private String mobile;

    @ApiModelProperty(value = "会员邮箱")
    @Pattern(regexp = "^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", message = "邮箱不合法，请核实！")
    private String mail;
}
